﻿#ifndef NSSHARE_SYS_FILE_MAPPING_H_
#define NSSHARE_SYS_FILE_MAPPING_H_

#include "../base/base_object.h"

namespace nsshare
{
    namespace sys
    {

class FileMapping
    :public base::BaseObject
{
public:
    enum Mode
    {
        kRead,
        kReadWrite,
    };

public:
    FileMapping();
    ~FileMapping();

    bool init(const Mode mode, const uint64_t size);
    void fini();
    void * handle() const;


private:
    void * handle_;
};

    }
}

#endif